<template>
	<view class="container">
		<jy-quick-btns></jy-quick-btns>
		<view class="header"></view>
			<view class="score">
				<view class="myScore">
					测评结果请在个人中心测评中心查看
<!-- 					<view>总分{{myScore}} 分</view>
					<view>平均分{{pjf}} 分</view> -->
				</view>
<!-- 				<view class="answer">
					测评结果请在个人中心测评中心查看
				</view> -->
			</view>
			<view class="con">
				<view class="btns">
					<button @click="navgator('myExam')" type="default" style="width: 90%; height: 90upx; background-color: rgb(46,160,253); margin: 42upx auto; border-radius: 48upx; color: white;">
						查看结果
					</button>
					<button @click="navgator('exam')" type="default" style="width: 90%; height: 90upx; background-color: rgb(46,160,253); margin: 42upx auto; border-radius: 48upx; color: white;">
						返回测评
					</button>
					<button v-if="diylink != ''" type="default" @click="navgator('diy')" plain style="width: 90%; background-color:#fff; margin-bottom: 30upx; border-radius: 48upx; color: rgb(46,160,253);border: 1px solid #007AFF;">
						跳转链接
					</button>
				</view>
			</view>
	</view>
</template>

<script>
	export default {
	name:'achievement',
	data(){
		return {
			myScore:'',
			pjf:'',
			diylink:''
		}
	},
	onLoad(options) {
		console.log(options.score)
		this.myScore = options.score
		this.pjf = options.pjf
		this.diylink = options.diylink
	},
	methods:{
		navgator(e){
			if(e == 'diy'){
				uni.navigateTo({
					url: this.diylink
				})
			}else{
				uni.navigateTo({
					url: `../${e}/${e}`
				})
			}
		}
	}
	}
</script>

<style lang="less" scoped>
	.container{
		height: 100vh;
		// background-color: pink;
		.header{
			height: 300upx;
			background:linear-gradient(to right,rgb(46,160,253),rgb(46,209,253));
		}
		
		.con{
			width: 100%;
			height: 800upx;
		}
		.score{
			position: absolute;
			top: 20%;
			left: 50%;
			transform: translate(-50%,-50%);
			width: 680upx;
			height: 320upx;
			background-color: white;
			border-radius: 20upx;
			text-align: center;
			.myScore{
				font-size: 35upx;
				color: rgb(46,160,253);
				font-weight: 700;
				margin: 20upx;
			}
			.answer{
				color: #333;
			}
		}
		
		
		.btns{
			    height: 400upx;
			    position: absolute;
			    top: 36%;
			    left: 0;
			    width: 100%;
				
		}
		
	}
</style>
